package vip.rssc.sharding.configs;

import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * <p>Description: [MyMetaObjectHandler]</p >
 * Created on 2021年10月21日
 *
 * @author <a href="chenjia@fehorizon.com">CJ</a>
 * @version 1.0
 * Copyright (c) 2021 上海宏信建设发展有限公司
 */
@Component
public class MyMetaObjectHandler implements MetaObjectHandler {
    @Override
    public void insertFill(MetaObject metaObject) {
        this.setFieldValByName("createTime", new Date(), metaObject);
    }

    @Override
    public void updateFill(MetaObject metaObject) {

    }
}
